//设置变量
@bg-color: pink;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
h1 {
  margin-top: 20px;
}
body {
  text-align: center;
  font: bold 20px "Courier";
}
//设置主窗口样式
.container {
  width: 360px;
  height: 420px;
  margin: 0 auto;
  text-align: center;
  border: 3px solid black;
  border-radius: 30px;
  background-color: @bg-color;
}
.game {
  width: 304px;
  height: 304px;
  margin: 20px auto;
  border: 2px solid black;
  position: relative;
  //蛇样式
  .snake {
    & > div {
      width: 10px;
      height: 10px;
      border: 1px solid @bg-color;
      background-color: black;
      position: absolute;
    }
  }
  //食物样式
  .food {
    width: 10px;
    height: 10px;
    border: 1px solid @bg-color;
    background-color: rgb(95, 224, 101);
    position: absolute;
    top:120px;
  }
}
.score {
  margin: 0 auto;
  display: flex;
  width: 304px;
  justify-content: space-between;
}
